﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace HostalVISA
{
    public partial class frmRegistrarHabitación : Form
    {
        public frmRegistrarHabitación()
        {
            InitializeComponent();
        }

        private void btnSalir_Click(object sender, EventArgs e)
        {
            this.Close();
            //MessageBox.Show("Asegurece de guardar los cambios", "ADVERTENCIA",
            //MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
        }

        private void btnEliminar_Click(object sender, EventArgs e)
        {
            //MessageBox.Show("Esta seguro de Eliminar", "AVISO",
            //MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

            string message = "¿Esta seguro que desea eliminar el registro?";
            string caption = "ADVERTENCIA";
            MessageBoxButtons buttons = MessageBoxButtons.YesNo;
            MessageBoxIcon icon = MessageBoxIcon.Question;
            DialogResult result;

            
            result = MessageBox.Show(message, caption, buttons,icon );

            if (result == System.Windows.Forms.DialogResult.Yes)
            {

                string messag = "Esta a punto de eliminar un registro, ¿Desea continuar?";
                string captio = "ADVERTENCIA";
                MessageBoxButtons button = MessageBoxButtons.OKCancel;
                MessageBoxIcon ico = MessageBoxIcon.Warning;
                DialogResult resul;
                
                resul = MessageBox.Show(messag, captio, button, ico);
                //this.Close();
        }
    }

        private void btnNuevo_Click(object sender, EventArgs e)
        {
            if (btnNuevo.Text == "Nuevo")
                btnNuevo.Text = "Guardar";
            //btnEditar .Image =
            else
                btnNuevo.Text = "Nuevo";
        }

        private void btnEditar_Click(object sender, EventArgs e)
        {
            if (btnEditar.Text == "Editar")
                btnEditar.Text = "Guardar";
            //btnEditar .Image =
            else
                btnEditar .Text = "Editar";
        }

        private void frmHabitación_Load(object sender, EventArgs e)
        {

        }

        private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void groupBox2_Enter(object sender, EventArgs e)
        {

        }
}
}